import React, { Component } from "react";
// import { HashRouter as Router, Route, Switch, Redirect } from "react-router-dom";
import { HashRouter as Router, Route} from "react-router-dom";
import Index from "./components/index/Index";
import Cart from "./components//cart/Cart";
import Category from "./components/category/Category";
import My from "./components/my/My";
import Tabbar from "./components/tarbar/Tabbar";
import SearchCenter from "./components/searchCenter/SearchCenter";
import GoodDetail from "./components/goodDetail/GoodDetail";
import GoodList from "./components/goodList/GoodList";
import Pay from "./components/pay/Pay";
import Login from "./components/login/Login";
import Register from "./components/register/Register";
class RouterConfig extends Component {
    render() {
        return (
            <Router>
                <Route path="/" exact render={() => <Tabbar><Index></Index></Tabbar>}></Route>
                <Route path="/cart" exact render={(props) => <Tabbar><Cart {...props}></Cart></Tabbar>}></Route>
                <Route path="/my" exact render={(props) => <Tabbar><My {...props}></My></Tabbar>}></Route>
                <Route path="/category" exact render={() => <Tabbar><Category></Category></Tabbar>}></Route>
                <Route path="/searchCenter" exact render={() => <SearchCenter></SearchCenter>}></Route>
                <Route path="/goodDetail/:goods_id" exact render={(props) => <GoodDetail {...props}></GoodDetail>}></Route>
                <Route path="/goodList"  exact render={(props) => <GoodList {...props}></GoodList>}></Route>
                <Route path="/pay" exact render={(props) => <Pay {...props}></Pay>}></Route>
                <Route path="/login" exact render={(props) => <Login {...props}></Login>}></Route>
                <Route path="/register" exact render={(props) => <Register {...props}></Register>}></Route>
            </Router>
        )
    }
}
export default RouterConfig


